home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / python2.6.postinst < prev    next >
Text File  |  2009-11-02  |  1KB  |  43 lines

  1. #! /bin/sh -e
  2.  
  3. if [ "$1" = configure ]; then
  4.     (
  5.     files=$(dpkg -L python2.6 | sed -n '/^\/usr\/lib\/python2.6\/.*\.py$/p')
  6.     python2.6 /usr/lib/python2.6/py_compile.py $files
  7.     if grep -sq '^byte-compile[^#]*optimize' /etc/python/debian_config; then
  8.         python2.6 -O /usr/lib/python2.6/py_compile.py $files
  9.     fi
  10.     )
  11. fi
  12.  
  13. case "$1" in
  14.     configure|abort-upgrade|abort-remove|abort-deconfigure)
  15.  
  16.         # Create empty directories in /usr/local
  17.         if [ ! -e /usr/local/lib/python2.6 ]; then
  18.             mkdir -p /usr/local/lib/python2.6 2> /dev/null || true
  19.             chmod 2775 /usr/local/lib/python2.6 2> /dev/null || true
  20.             chown root:staff /usr/local/lib/python2.6 2> /dev/null || true
  21.         fi
  22.         if [ ! -e /usr/local/lib/python2.6/site-packages ]; then
  23.             mkdir -p /usr/local/lib/python2.6/site-packages 2> /dev/null || true
  24.             chmod 2775 /usr/local/lib/python2.6/site-packages 2> /dev/null || true
  25.             chown root:staff /usr/local/lib/python2.6/site-packages 2> /dev/null || true
  26.         fi
  27.     ;;
  28.  
  29.     *)
  30.         echo "postinst called with unknown argument \`$1'" >&2
  31.         exit 1
  32.     ;;
  33. esac
  34.  
  35. # Automatically added by dh_installmenu
  36. if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
  37.     update-menus
  38. fi
  39. # End automatically added section
  40.  
  41.  
  42. exit 0
  43.